Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[editor] PaLMChatParserPromptSchema #754

Merged
merged 1 commit into from
Jan 4, 2024
Merged

[editor] PaLMChatParserPromptSchema #754

merged 1 commit into from
Jan 4, 2024

Conversation

rholinshead
Copy link
Contributor

@rholinshead rholinshead commented Jan 4, 2024

[editor] PaLMChatParserPromptSchema

[editor] PaLMChatParserPromptSchema

Implement the Prompt Schema for PaLM Chat, using the supported params with defaults from https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/text-chat, selecting those that are defined in the refine_chat_completion_params of palm.py:

def refine_chat_completion_params(model_settings):
    # completion parameters to be used for Palm's chat completion api
    # messages handled seperately
    supported_keys = {
        "candidate_count",
        "examples",
        "model",
        "temperature",
        "top_k",
        "top_p",
        "context",
    }
Screenshot 2024-01-04 at 1 59 24 PM

Stack created with Sapling. Best reviewed with ReviewStack.

@@ -38,7 +38,7 @@ export const OpenAIChatModelParserPromptSchema: PromptSchema = {
items: {
type: "object",
required: ["name", "parameters"],
parameters: {
properties: {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was using incorrect key, properties is needed:
Screenshot 2024-01-04 at 2 04 50 PM

# [editor] PaLMChatParserPromptSchema

Implement the Prompt Schema for PaLM Chat, using the supported params with defaults from https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/text-chat, selecting those that are defined in the `refine_chat_completion_params` of palm.py:
```
def refine_chat_completion_params(model_settings):
    # completion parameters to be used for Palm's chat completion api
    # messages handled seperately
    supported_keys = {
        "candidate_count",
        "examples",
        "model",
        "temperature",
        "top_k",
        "top_p",
        "context",
    }
 ```

<img width="1853" alt="Screenshot 2024-01-04 at 1 59 24 PM" src="https://github.com/lastmile-ai/aiconfig/assets/5060851/50e08b43-2956-4fa0-98e4-4ab165efb6a9">
@rholinshead
Copy link
Contributor Author

Landing to unblock bug bashing, will fix forward as needed

@rholinshead rholinshead merged commit 86890cd into main Jan 4, 2024
1 check passed
rholinshead added a commit that referenced this pull request Jan 4, 2024
# [editor] Fix Model Search to Ignore Casing

Previously, the model search was doing exact match, including
capitalization. So, searching 'hu' would not show the
"HuggingFaceTextGenerationParser".

Fix by making both search and model names lowercase when filtering:
<img width="354" alt="Screenshot 2024-01-04 at 3 35 46 PM"
src="https://github.com/lastmile-ai/aiconfig/assets/5060851/10baf717-6192-4de8-bab6-046f678ac9ef">


---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with
[ReviewStack](https://reviewstack.dev/lastmile-ai/aiconfig/pull/756).
* __->__ #756
* #755
* #754
@rossdanlm rossdanlm deleted the pr754 branch January 5, 2024 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant